1. Field of the Invention
Embodiments of the present invention relate generally to the field of computer graphics and more specifically to an adaptive scaling technique that uses a programmable video engine.
2. Description of the Related Art
A video image typically is sampled, digitally filtered, and then scaled before being displayed on a display device at a modified resolution. In the sampling step, the analog video signal is digitally sampled to create a digital representation of the video signal (the “digitized video signal”). As is well known, the sampling operation results in spectral replicas of the frequency domain representation of the digitized video signal at each multiple of the sampling frequency.
As is also well known, scaling a video image from a first resolution to a higher resolution (referred to as “upscaling”) adds interpolated information to the digitized video signal and, thus, effectively increases the sampling frequency associated with the digitized video signal. Consequently, the frequency gap between the spectral replicas in the frequency domain representation of the digitized video signal increases. By contrast, scaling a video image from a first resolution to a lower resolution (referred to as “downscaling”) removes information from the digitized video signal and, thus, effectively decreases the sampling frequency associated with the digitized video signal. Consequently, the frequency gap between the spectral replicas in the frequency domain representation of the digitized video signal decreases. If the frequency gap between spectral replicas decreases too much when downscaling, the spectral replicas may begin to overlap. Such overlap is problematic because it causes “phantom data” to appear in the frequency domain representation of the actual digitized signal, resulting in aliasing in the displayed video image.
The filtering step removes unwanted frequency data prior to the scaling step. When upscaling, the filtering step attempts to remove the spectral replicas from the frequency data, leaving only the “base-band” (i.e., the frequency representation of the original analog signal). When downscaling, the filtering step attempts to remove the spectral replicas from the frequency data as well as establish a cut off frequency that limits the bandwidth of the frequency representation of the actual digitized signal such that no overlap occurs with a spectral replica when the frequency gap decreases. Limiting the bandwidth in this fashion prevents aliasing.
The shape of a multi-tap filter, which establishes the passband, the transitionband and the rejectionband of the filter, is determined by the filter coefficients. One current filter design employs two sets of filter coefficients. One set of coefficients typically is optimized for upscaling, and the second set of coefficients is optimized for a downscaling scaling factor of 2. If the actual operating point (i.e., the actual scaling factor being used for scaling the video image) falls between the two optimized operating points, then a linear interpolation based on the actual scaling factor is performed between the two sets of optimized scaling coefficients to determine the filter coefficients for the actual operating point.
One drawback to the current approach is that multi-tap filter resulting from the interpolation is far from optimal because the two sets of coefficients are designed for quite different operating points. Moreover, the filter coefficients required for a particular intermediate operating point may not be accurately determined by a linear function of the scaling factor. Suboptimal filtering effects may include excessive attenuation of the passband, suboptimal placement of the cut-off frequency, and reduced attenuation of the rejectionband, resulting in a fuzzy (e.g., having excessive passband attenuation) and/or distorted (e.g., having aliased components) scaled video image.
As the foregoing illustrates, what is needed in the art is a more precise multi-tap filter design that results in less image attenuation and/or aliasing during video image scaling.